Gives back the smallest number target holds: list_min(scores) of 7, 3 and 9 is 3. Use it for the lowest cooldown or the shortest distance.
list_min(target) -> element| Name | Type |
|---|---|
target | list |
element
Gives back the smallest number in target, a list. list_min(scores) of 7, 3 and 9 is 3. Use it for the lowest cooldown or the shortest distance.
/// @type {list<int>}
var scores = [7, 3, 9];
var answer = list_min(scores); // 30, and the game carries on.list_sort_by and take the first one.One pass over the items.
One pass from the first item to the last, keeping the smallest seen so far - nothing is changed or copied. For a list of list_length(target) items it takes that many comparisons. Whole numbers and decimals only; text, yes-or-no values, structs and references are refused when the project is checked. An empty one gives back 0.